﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/PictureMaster.Master"
	Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	窝吧-热图首页
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<%
		ViewPictureList[] bigEyes = ViewData["BigEyes"] as ViewPictureList[];
		IEnumerable<IGrouping<int, ViewPictureGroup>> pictureGroupByCategory = ViewData["PictureCategories"] as IEnumerable<IGrouping<int, ViewPictureGroup>>;
		PictureGroup[] groups = ViewData["HotPictureGroups"] as PictureGroup[];
		PictureCategory[] pictureCategories = ViewData["Categories"] as PictureCategory[];
		ViewPictureList[] commendGroups = ViewData["CommendPictureGroups"] as ViewPictureList[];
		PictureGroup[] newestGroups = ViewData["PictureGroupNewest"] as PictureGroup[];
		string pictureFolder = Hotnet.Biz.Properties.Settings.Default.UploadFolder;
	%>
	<div class="navigateBar">
		<div class="navigateTitle">
			<span><a href="http://www.woxx8.com">窝吧</a></span> >>
			<span class="currentPosition">图片首页</span>
		</div>
	</div>
	<div>
		<div id="lantern_slide" onmouseout="divMouseOut()" style=" float:left;">
			<table class="ge" id="ge" cellspacing="0" cellpadding="0">
				<tbody>
					<tr>
						<td class="pic" id="bimg">
							<!---图像大小300px×300px--->
							<%for (int i=0;i<bigEyes.Length;i++)
							{
								var item = bigEyes[i];
							%>
							<div class='<%=i==0?"dis":"undis" %>' name="f">
								<a href="/Picture/Group/<%=item.GroupID %>/" onmouseover="mouseOnImage();" target="_blank" >
									<img style=" " src="<%=Hotnet.Biz.Properties.Settings.Default.首页焦点图片文件夹+item.CoverImageSrc %>" alt="<%=item.Name %>" />
								</a>
							</div>
							<% } %>
							<table id="font_hd" cellspacing="0" cellpadding="0">
								<tbody>
									<tr>
										<td class="lkff" id="info">
											<%for (int i=0;i<bigEyes.Length;i++)
											{
												var item = bigEyes[i];
											%>
											<div class='<%=i==0?"dis":"undis" %>' name="f">
												<a href="/Picture/Group/<%=item.GroupID %>/" target="_blank" >
													<%=item.Name %>
												</a>
											</div>
											<% } %>
										</td>
										<td id="simg">
											<%for (int i=0;i<bigEyes.Length;i++)
											{
											%>
											<div class='<%=i==0?"":"f1" %>' onclick="play(x[<%=i %>],<%=i %>,true)" name="f">
												<%=i+1 %>
											</div>
											<% } %>
										</td>
									</tr>
								</tbody>
							</table>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
		<div class="pictureRecommand" id="divPictureRecommend">
			<div class="moduleTitle" style=" margin-top:5px;">
				本站推荐 <span style="margin-left: 152px;">
					<a href="/PictureRecommandMore" target="_blank" style="font-size: 14px; color: #FF0099;">
						更多>>
					</a>
					</span>
			</div>
			<ul>
				<%
					for (int i = 0; i < commendGroups.Length; i++)
					{
				%>
				<li class="photo sample1">
					<a href="/Picture/Group/<%=commendGroups[i].GroupID %>/" title="<%=commendGroups[i].Name %>" class="pictureRecommandA">
						<span></span>
						<img src="<%=Hotnet.Biz.Properties.Settings.Default.UploadFolder+commendGroups[i].CoverImageSrc %>" alt="" />
					</a>
					<%--<div class="pictureTitle">
						<%=StringUtility.CutString(commendGroups[i].Name, 12)%>
					</div>--%>
				</li>
				<% } %>
			</ul>
		</div>
		<div class="pictureHotAssort" id="divPictureHotAssort">
			<div class="moduleTitle" style=" margin-top:5px;">
				热图排行榜
			</div>
			<ul>
				<%
					for (int i = 0; i < groups.Length; i++)
					{
				%>
				<li <%=(i % 2) == 0 ? "class='backColorEven'" : ""%>>
				<b <%=(i<3)?"class='backColorTop3'":"class='backColorGreater3'" %>>
					<span style="margin-left:4px;"><%=(i + 1) %></span>
				</b>
					<a href="/Picture/Group/<%=groups[i].GroupID %>/" style="<%=(i<3)?"color:rgb(255, 0, 153)":"" %>">
						<%=StringUtility.CutString(groups[i].Name, 16)%>
					</a>
				</li>
				<% } %>
			</ul>
		</div>
	</div>
	<div id="divNewestPictureGroup" class="newestPictureGroup">
		<div class="moduleTitle">
			最新图片
		</div>
		<ul class="gallery">
			<%
				for (int i = 0; i < newestGroups.Length; i++)
				{
			%>
			<li>
				<a href="/Picture/Group/<%=newestGroups[i].GroupID %>" title="<%=newestGroups[i].Name %>">
					<em>
						<%=StringUtility.CutString(newestGroups[i].Name, 17)%>
					</em>
					<img src="<%=newestGroups[i].CoverImage.ThumbnailPath %>" alt="" />
				</a>
				<div class="newestPictureTitle">
					<a href="/Picture/Group/<%=newestGroups[i].GroupID %>"><%=StringUtility.CutString(newestGroups[i].Name, 25)%></a>
				</div>
			</li>
			<% } %>
		</ul>
	</div>
	
	<div class="hotTag">
		<div class="moduleTitle" style=" margin-bottom:4px;">
			热门标签
		</div>
		<%Html.RenderPartial("TagControl", ViewData["HotPictureTag"]); %>
	</div>
	
	<%-- 按照VideoCategory分类 --%>
	<div id="divCategoryVideo" class="pictureByCategory">
		<%
			int categorySerial = 0;
			foreach (IGrouping<int, ViewPictureGroup> grouping in pictureGroupByCategory)
			{
		%>
		<div id="divCategoryGroup<%=categorySerial %>" class="groupItem" style="<%=categorySerial%2==0?"border-right:1px solid #c3c3c3":"" %>" >
			<div class="moduleTitle moduleTitleBg">
				<%
					var item = pictureCategories.First(x => x.CategoryID == grouping.Key);
				%>
				<%=item.Name %>
				<span style="margin-left: 300px;">
					<a href="/Picture/Category/<%=item.CategoryID %>"
					target="_blank" style="font-size: 14px; color: #FF0099;">更多>></a>
				</span>
			</div>
			<ul>
				<%
					foreach (ViewPictureGroup pictureItem in grouping)
					{
				%>
				<li>
					<a href="/Picture/Group/<%=pictureItem.GroupID %>" target="_blank" class="catgoryImgFrame">
						<img src="<%=pictureFolder + pictureItem.CoverImagePath %>" alt="picture" />
					</a>
					<div class="pictureTitle">
						<a href="/Picture/Group/<%=pictureItem.GroupID %>" target="_blank"><%=StringUtility.CutString(pictureItem.Name, 20)%></a>
					</div>
				</li>
				<%
					}
				%>
			</ul>
		</div>
		<%
			categorySerial++;
			}
		%>
	</div>
	<div style="clear: both;">
	</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
	<script src="/Scripts/picshow.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(document).ready(function() {
		});
	</script>

</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="StyleContent" runat="server">
	<link media="all" href="/Css/tpbk-activity.css" type="text/css" rel="stylesheet" />
	<link href="/Css/pictureFrame.css" rel="stylesheet" type="text/css" />
	<style type="text/css">
		/*最新热图*/
		.newestPictureGroup
		{
			padding-top: 8px;
			float: left;
			border: 1px solid #c6c6c6;
			border-top:none;
			width:968px;
			
		}
		.newestPictureGroup ul
		{
			margin: 0px 0px 0px 15px;
			padding: 0px;
		}
		.newestPictureGroup li
		{
			list-style-type: none;
			float: left;
			height: 170px;
			_height:180px;
			width: 186px;
		}
		.newestPictureGroup img
		{
			border: none;
			height: 120px;
			width: 160px;
		}
		.newestPictureGroup a
		{
			margin-bottom:3px;
			float: left;
			width: 170px;
			height: 130px;
			border: solid 1px #ccc;
			
		}
		.newestPictureTitle
		{
			width: 173px;
			font-size: 14px;
			line-height: 130%;
			text-align: center;
			overflow: hidden;
			clear: left;
		}
		
		.newestPictureTitle a
		{
			float:none;
			width:173px;
			height:30px;
			border:none;
		}
		.newestPictureTitle a:hover
		{
			color:Red;
			
		}
		
		/* 每个分类下面的热门图片列表 */
		.pictureByCategory
		{
			border: 1px solid #c6c6c6;
			border-top:none;
			float:left;
			width:968px;
			padding:6px 0px;
		}
		.moduleTitle
		{
			font-size: 14px;
			color: #BC2D09;
			font-weight: bold;
			margin:0px 4px 5px 6px;
			text-align: left;
			/*border-bottom: 1px dotted #c6c6c6;*/
		}
		.moduleTitleBg
		{
			background-color:#f8d3d3;
			padding:5px 2px;
			margin-top:5px 0px;
		}
		
		.pictureByCategory ul
		{
			margin: 0px;
			padding: 0px;
			margin-left: 4px;
		}
		.pictureByCategory li
		{
			list-style: none;
			float: left;
			width: 155px;
			height: 165px;
		}
		
		.pictureTitle
		{
			width: 150px;
			font-size: 14px;
			line-height: 130%;
			text-align: center;
			overflow: hidden;
			clear: left;
		}
		.pictureTitle a
		{
			color:#124C9A;
			text-decoration:none;
			
		}
		.pictureTitle a:hover
		{
			color:Red;
			border:1px solid #FFAA28;
		}
		
		
		
		.pictureByCategory img
		{
			border: none;
			padding: 5px 0px 4px 5px;
			height: 106px;
			width: 140px;
		}
		.catgoryImgFrame
		{
			float: left;
			width: 150px;
			height: 120px;
			background: transparent url(/images/picbg_2.gif) no-repeat scroll;
		}
		.groupItem
		{
			float: left;
			width: 471px;
			 *width:472px;
			 margin-top:5px;
		}
		/*热门标签*/
		/* tag列表样式 */
		.hotTag
		{
			border:1px solid #c6c6c6;
			border-top:none;
			background-color: White;
			float:left;
			width:968px;
			padding-top:8px;
			
		}
		.hotTag li
		{
			width:90px;
			height:25px;
			font-size:16px;
		}
		.hotTag ul
		{
			margin:0px;
			padding:0px;
			padding-left:10px;
		}
		
		.hotTag a:hover
		{
			font-size:18px;
			font-weight:bolder;
			text-decoration:underline;
		}
		
		
		/* 热图排行 */
		.pictureHotAssort
		{
			width: 275px;
			 border:1px solid #c6c6c6;
			 border-left:none;
			 float:left;
			 height:440px;
			
		}
		.pictureHotAssort b
		{
			margin:0px 2px 0px 0px;
			color: White;
			padding: 2px 0px;
			text-align:center;
			
		}
		.pictureHotAssort ul
		{
			margin: 0px;
			padding: 0px;
		}
		.pictureHotAssort a
		{
			color:#124C9A;
			font-family:宋体;
			font-size:12px;
			text-decoration:none;
		}
		.pictureHotAssort a:hover
		{
			color:red;
			text-decoration:underline;
		}
		.pictureHotAssort li
		{
			list-style-type: none;
			margin: 5px;
			padding: 3px 0px;
		}
		.backColorEven
		{
			background-color: #EEEEEE;
		}
		.backColorTop3
		{
			background-color: Red;
		}
		.backColorGreater3
		{
			background-color: #ccc;
			
		}
		/*本站推荐*/
		.pictureRecommand
		{
			width: 314px;
			border: 1px solid #c6c6c6;
			border-right:none;
			border-left:none;
			float: left;
			height: 440px;
		}
		.pictureRecommand ul
		{
			margin: 0px;
			padding: 0px;
			margin-left: 4px;
		}
		.pictureRecommand li
		{
			list-style: none;
			float: left;
			width:155px;
			height:140px;
			_height:138px;
		}
		.pictureRecommand img
		{
			height:120px;
			width:140px;
		}
		.pictureRecommandA
		{
			height:128px;
			width:149px;
		}
		
		/**/
		
	</style>
</asp:Content>
